package com.example.grape_effect.zzztest

import android.opengl.GLSurfaceView
import com.example.grape_effect.effet.filter.Camera2Filter
import com.example.grape_effect.base.BasicRenderer
import com.example.grape_effect.animation.TranslateAnimation
import com.example.grape_effect.effet.effect.RadialBlurEffect
import com.example.grape_effect.effet.filter.GrayFilter
import com.example.grape_effect.effet.filter.LYFilterQueue
import com.example.grape_effect.effet.transition.TranslateTransition
import com.example.grape_effect.gl.common.GLProgram
import javax.microedition.khronos.egl.EGLConfig
import javax.microedition.khronos.opengles.GL10

class TestRender(glSurfaceView1: GLSurfaceView): BasicRenderer(glSurfaceView1) {

//   private val animation:NoAnimation = NoAnimation()

    private var filter = Camera2Filter()
    private var showFilter = GrayFilter()
    private var animation = TranslateAnimation(TranslateTransition.leftToRight)
    lateinit var queuen: LYFilterQueue
    var transition= TranslateTransition(TranslateTransition.leftToRight)
    var effect = RadialBlurEffect()

    override fun onSurfaceCreated(gl: GL10?, config: EGLConfig?) {
        super.onSurfaceCreated(gl, config)
    }
    override fun onDrawFrame(gl: GL10?) {

//        queuen.draw()
//        showFilter.setInTexture(queuen.getOutTexture())
//        showFilter.draw()
        GLProgram.clearColor()
//        animation.draw()
        transition.draw()
//        effect.draw()
    }


}